/* uDig - User Friendly Desktop Internet GIS client
 * http://udig.refractions.net
 * (C) 2004-2008, Refractions Research Inc.
 *
 * This library is free software; you can redistribute it and/or
 * modify it under the terms of the GNU Lesser General Public
 * License as published by the Free Software Foundation;
 * version 2.1 of the License.
 *
 * This library is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 * Lesser General Public License for more details.
 */
package feature;


/**
 * represents some real world spatial entity as a geographic shape and a set of attributes
 * <p>
 *
 * </p>
 * @author John
 * @since 1.1.0
 */
public class Feature {
    
    public Feature(){}
    
    public String getValueAsString(String name) {
        String s;
        if (name.equalsIgnoreCase("Country"))
            s = "Canada";
        else if (name.equalsIgnoreCase("Y2000"))
            s = "15000";
        else if (name.equalsIgnoreCase("Y2001"))
            s = "20000";
        else
            s = "";
        
        return s;
    }
    
    public double getValueAsDouble(String name) {
        if (name.equalsIgnoreCase("Country"))
            return Double.NaN;
        if (name.equalsIgnoreCase("Y2000"))
            return 15000.0;
        if (name.equalsIgnoreCase("Y2001"))
            return 20000.0;
        
        return Double.NaN;
    }
    
    Geometry getGeometry() {
        return null;
    } 
}
